<template>
  <div class="map">
    <x-header class="header">车辆跟踪</x-header>
    <baidu-map class="bm-view" :center="{lng: center.longitude, lat: center.latitude}" :zoom="zoom">
    </baidu-map>
  </div>
</template>

<script>
import {
  XHeader
} from 'vux'
import { mapState } from 'vuex'

export default {
  name: 'map',
  components: {
    XHeader
  },
  data () {
    return {}
  },
  computed: {
    ...mapState({
      center: state => state.map.center,
      zoom: state => state.map.zoom
    })
  },
  methods: {
  }
}
</script>

<style lang="less">
.map{
  .header{
    z-index: 99;
  }
  .bm-view{
    position: absolute;
    top: 46px;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
  }
}
</style>
